import { prop, modelOptions } from '@typegoose/typegoose'
import { EntityModel } from '@midwayjs/typegoose'

class Submitter {
  username: string
  nickname: string
}

@modelOptions({ options: { allowMixed: 0 } })
@EntityModel()
export class WorkflowData {
  @prop()
  public name: string

  @prop()
  public submitter: Submitter

  @prop({ type: () => Object })
  public formData: Record<string, any>

  @prop({ type: () => [Object] })
  public flowData: any[]

  @prop()
  public status: '未处理' | '** 处理中' | '通过' | '否决' | string
}
